package com.jeeplus.test.jlnu.student.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.jeeplus.test.jlnu.student.domain.entity.ApprovalForm;
import com.jeeplus.test.jlnu.student.domain.entity.StudentInfoApprove;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;


@Mapper
public interface StudentInfoApproveMapper extends BaseMapper<StudentInfoApprove> {

    void insertStudentInfoApprove(StudentInfoApprove studentInfoApprove);

    List<StudentInfoApprove> getOutside(String studentId);


    int updateStudentInfoApprove(@Param("studentInfoApprove") StudentInfoApprove studentInfoApprove);

    int updateStudentInfoApproveContent(@Param("studentId") String studentId,@Param("outsideType") String outsideType,@Param("content")String content);

    StudentInfoApprove getStudentInfo(@Param("studentId") String studentId,@Param("outsideType") String outsideType,@Param("flag") String flag);

    int updateType(@Param("approvalForm") ApprovalForm approvalForm);

    List<StudentInfoApprove> getOutsidePage(@Param("studentInfoApprove") StudentInfoApprove studentInfoApprove, Page<StudentInfoApprove> page);

    List<StudentInfoApprove> getByStatus(String studentId,int approvalStatus);

    Long countDistinctStudentId(@Param("studentInfoApprove") StudentInfoApprove studentInfoApprove);

    int batchUpdateByEntityType(@Param("approvalForm") ApprovalForm approvalForm);
}
